import React from 'react'
import {Switch,Route,Redirect} from "react-router-dom"
import Admin from './view/admin'
import Login from './view/login'
import { store } from './store/index'
import {Provider} from "react-redux"
import dhtoken from './dh/dhtoken'
 function App() {
  return (
    <div>
      <Provider store={store}>


      <Switch>
        <Route path="/admin" component={Admin}></Route>
        <Route path="/login" component={Login}></Route>
        <Redirect from="/" to="/admin"></Redirect>
      </Switch>
            </Provider>
    </div>
  )
}
export default dhtoken(App)